<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<jsp:useBean id="videoDAO" class="inet.db.video.VideoDAO" scope="session"/>
<%@ page import = "java.util.*"%>
<%@ page import="java.math.*" %>
<link href="include/style.css" rel="stylesheet" type="text/css"/>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
														  <tr>
                                                        <%
								Collection cVideoIds=videoDAO.findFreeClip();
									Iterator it=cVideoIds.iterator();
									BigDecimal id=null;
									while(it.hasNext()){
										id=(BigDecimal)it.next();
									
						  %>	   
                          <td width="23">&nbsp;</td>
							<td width="80">
								<table width="100%"  border="0" cellspacing="0" cellpadding="0" >
									  <tr bgcolor="98bbce">
										<td height="80"><img src="<%=request.getContextPath() %>/videoImage?id=<%=id %>" border="0" height="83" width="82"></td>
									  </tr>
									  <tr>
									  	<td align="center">
									  	<%=id %>	
									  	</td>
									  </tr>
								</table>
							</td>	
								<%if(it.hasNext()){
							id=(BigDecimal)it.next();
						 %>
							<td width="23">&nbsp;</td>
							<td width="80">
								<table width="100%"  border="0" cellspacing="0" cellpadding="0" >
									  <tr bgcolor="98bbce">
										<td height="80"><img src="<%=request.getContextPath() %>/videoImage?id=<%=id %>" border="0" height="83" width="82"></td>
									  </tr>
									  <tr>
									  	<td align="center">
									  	<%=id %>	
									  	</td>
									  </tr>
								</table>			
							</td>	
						 <%}else{ %>
						 	<td width="23">&nbsp;</td>
							<td width="80">
							</td>	
						 <%}%>
						 <%if(it.hasNext()){
							id=(BigDecimal)it.next();
						 %>
							<td width="23">&nbsp;</td>
							<td width="80">
								<table width="100%"  border="0" cellspacing="0" cellpadding="0" >
									  <tr bgcolor="98bbce">
										<td height="80"><img src="<%=request.getContextPath() %>/videoImage?id=<%=id %>" border="0" height="83" width="82"></td>
									  </tr>
									  <tr>
									  	<td align="center">
									  	<%=id %>	
									  	</td>
									  </tr>
								</table>
							</td>	
						 <%}else{ %>
						 	<td width="23">&nbsp;</td>
							<td width="80">
							</td>	
						 <%}out.println("<td width=\"23\">&nbsp;</td></tr>"); %>
					<%} %>						
														</table>
	